﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.SYS
{
    [DataContract, Table("SysOTP")]
    public class OTP
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity), DataMember]
        public virtual int OtpId { get; set; }

        [DataMember]
        public virtual Guid UniqueId { get; set; }

        [DataMember]
        public DateTime? CreatedWhen { get; set; }

        [DataMember]
        public int EmpId { get; set; }

        [DataMember]
        public string EmployeeFullName { get; set; }

        [DataMember]
        public int UserId { get; set; }

        [DataMember]
        public string UserCode { get; set; }
        
        [DataMember]
        public int? WorkingJobSiteSeq { get; set; }

        [DataMember]
        public string WorkingJobSiteName { get; set; }

        [DataMember]
        public int? WorkAreaId { get; set; }
        
        [DataMember]
        public string RedirectUrl { get; set; }

        [DataMember]
        public string CustomField1 { get; set; }
        
        [DataMember]
        public string CustomField2 { get; set; }
        
        [DataMember]
        public string CustomField3 { get; set; }
        
        public OTP()
        {
            UniqueId = Guid.NewGuid();
            CreatedWhen = DateTime.Now;
        }

    }
}